﻿<phone:PhoneApplicationPage x:Class="SamplePlayer.WP8.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:mmppf="clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework"
                            xmlns:smmedia="clr-namespace:SM.Media.MediaPlayer;assembly=SM.Media.MediaPlayer.WP8"
                            mc:Ignorable="d"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            shell:SystemTray.IsVisible="False" SupportedOrientations="PortraitOrLandscape">
    <phone:PhoneApplicationPage.Resources>
        <Style TargetType="Button">
            <Setter Property="Padding" Value="6,4"/>
            <Setter Property="Margin" Value="-6,-5"/>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <mmppf:MediaPlayer x:Name="player" Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8">
            <mmppf:MediaPlayer.Plugins>
                <smmedia:StreamingMediaPlugin />
            </mmppf:MediaPlayer.Plugins>
        </mmppf:MediaPlayer>
        <!--<mmppf:MediaPlayer Source="https://devimages.apple.com.edgekey.net/resources/http-streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8">
            <mmppf:MediaPlayer.Plugins>
                <smmedia:StreamingMediaPlugin />
            </mmppf:MediaPlayer.Plugins>
        </mmppf:MediaPlayer>-->
        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <Button Content="Play"
                    Height="Auto"
                    Name="playButton"
                    Click="play_Click"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"  />
            <Button Content="Stop"
                    Height="Auto"
                    Name="stopButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="stopButton_Click" />
            <Button Content="Wake"
                    Name="wakeButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="wakeButton_Click" />
            <Button Content="Previous"
                    Height="Auto"
                    Name="previousButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="prevButton_Click" />
            <Button Content="Next"
                    Height="Auto"
                    Name="nextButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="nextButton_Click" />
        </StackPanel>
    </Grid>

</phone:PhoneApplicationPage>